package com.guigu.eduservice.service;

import com.github.pagehelper.PageInfo;
import com.guigu.eduservice.dto.UserDto;
import com.guigu.eduservice.entity.Businessman;
import com.baomidou.mybatisplus.extension.service.IService;

import com.guigu.eduservice.entity.Equipment;
import com.guigu.eduservice.vo.BusinessmanVo;

import java.util.List;


/**
 * <p>
 * 业务员表（含检测评估师，负责设备检测、求购跟进） 服务类
 * </p>
 *
 * @author janecraft
 * @since 2025-09-27
 */
public interface BusinessmanService extends IService<Businessman> {
    //业务员分页
    PageInfo<Businessman> getBusinessmanAll(BusinessmanVo vo, Integer pageNum, Integer pageSize);

    //业务员登录(用的user表的表单实体类)
    String EmployeeLogin(UserDto userDto);

    //根据操作员的id查询业务员
    Businessman getOperatorId(Integer id);

    //根据业务员的id查询设备表和业务员关联的表，再根据关联表里的设备Id查询业务员所有归属的设备
    List<Equipment> getBusinessmanEquipmentByBusinessmanId(Long  BusinessmanId);

    //根据业务员的id查询他分配了多少台设备
    Integer getCountByBusinessman_id (Long businessman_id);
}
